🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / intro / src / commonMain / kotlin / org / meshtastic / feature / intro / BluetoothScreen.kt
Displaying Raw • Download
feature/intro/src/commonMain/kotlin/org/meshtastic/feature/intro/BluetoothScreen.kt fix/fdroid-map-rendering (113121c4) Text, 3.73 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.intro
Tff7b72import T7ee787androidx.compose.material3.Surface
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.ui.tooling.preview.PreviewLightDark
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.bluetooth_feature_config
Tff7b72import T7ee787org.meshtastic.core.resources.bluetooth_feature_config_description
Tff7b72import T7ee787org.meshtastic.core.resources.bluetooth_feature_discovery
Tff7b72import T7ee787org.meshtastic.core.resources.bluetooth_feature_discovery_description
Tff7b72import T7ee787org.meshtastic.core.resources.bluetooth_permission
Tff7b72import T7ee787org.meshtastic.core.resources.configure_bluetooth_permissions
Tff7b72import T7ee787org.meshtastic.core.resources.next
Tff7b72import T7ee787org.meshtastic.core.resources.permission_missing_31
Tff7b72import T7ee787org.meshtastic.core.resources.settings
Tff7b72import T7ee787org.meshtastic.core.ui.icon.Antenna
Tff7b72import T7ee787org.meshtastic.core.ui.icon.Bluetooth
Tff7b72import T7ee787org.meshtastic.core.ui.icon.MeshtasticIcons
Tff7b72import T7ee787org.meshtastic.core.ui.theme.AppTheme
T8b949e/**
* Screen for configuring Bluetooth permissions during the app introduction. It explains why Bluetooth permissions are
* needed and provides options to grant them or skip.
*
* @param showNextButton Indicates whether to show a "Next" button (if permissions are already granted) or a "Configure"
* button.
* @param onSkip Callback invoked if the user chooses to skip Bluetooth permission setup.
* @param onConfigure Callback invoked when the user proceeds to configure or grant permissions.
* @param onOpenSettings Callback invoked when the user taps the settings link.
*/
Tf0883e@Composable
Tff7b72internal Tff7b72fun Td2a8ffBluetoothScreenTb4b4b4(
Te6edf3showNextButtonTb4b4b4: Tffa657BooleanTb4b4b4,
Te6edf3onSkipTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3onConfigureTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3onOpenSettingsTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Tb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3annotatedString Tff7b72=
Te6edf3createClickableAnnotatedStringTb4b4b4(
Te6edf3fullTextRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3permission_missing_31Tb4b4b4,
Te6edf3linkTextRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3settingsTb4b4b4,
Te6edf3tag Tff7b72= Te6edf3SETTINGS_TAGTb4b4b4,
Tb4b4b4)
Tff7b72val Te6edf3features Tff7b72=
Te6edf3listOfTb4b4b4(
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3MeshtasticIconsTb4b4b4.Te6edf3BluetoothTb4b4b4,
Te6edf3titleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3bluetooth_feature_discoveryTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3bluetooth_feature_discovery_descriptionTb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3MeshtasticIconsTb4b4b4.Te6edf3AntennaTb4b4b4,
Te6edf3titleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3bluetooth_feature_configTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3bluetooth_feature_config_descriptionTb4b4b4,
Tb4b4b4)Tb4b4b4,
Tb4b4b4)
Te6edf3PermissionScreenLayoutTb4b4b4(
Te6edf3headlineRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3bluetooth_permissionTb4b4b4,
Te6edf3annotatedDescription Tff7b72= Te6edf3annotatedStringTb4b4b4,
Te6edf3features Tff7b72= Te6edf3featuresTb4b4b4,
Te6edf3onSkip Tff7b72= Te6edf3onSkipTb4b4b4,
Te6edf3onConfigure Tff7b72= Te6edf3onConfigureTb4b4b4,
Te6edf3configureButtonTextRes Tff7b72= Tff7b72if Tb4b4b4(Te6edf3showNextButtonTb4b4b4) Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3next Tff7b72else Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3configure_bluetooth_permissionsTb4b4b4,
Te6edf3onAnnotationClick Tff7b72= Tb4b4b4{ Te6edf3onOpenSettingsTb4b4b4(Tb4b4b4) Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}
Tf0883e@PreviewLightDark
Tf0883e@Composable
Tff7b72private Tff7b72fun Td2a8ffBluetoothScreenPreviewTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3AppTheme Tb4b4b4{ Te6edf3Surface Tb4b4b4{ Te6edf3BluetoothScreenTb4b4b4(Te6edf3showNextButton Tff7b72= Tff7b72falseTb4b4b4, Te6edf3onSkip Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4, Te6edf3onConfigure Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4, Te6edf3onOpenSettings Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4) Tb4b4b4} Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.06s